<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngCookies/cookies.js#L21" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngCookies/cookies.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$cookies</code>
<div><span class="hint">service in module <code ng:non-bindable="">ngCookies</code>
</span>
</div>
</h1>
<div><h2 id="Description">Description</h2>
<div class="description"><div class="ngcookies-cookies-page"><p>Provides read/write access to browser&#39;s cookies.</p>
<p>Only a simple Object is exposed and by adding or removing properties to/from
this object, new cookies are created/deleted at the end of current $eval.</p>
<p>Requires the <a href="api/ngCookies"><code>ngCookies</code></a> module to be installed.</p>
</div></div>
<h2 id="Dependencies">Dependencies</h2>
<ul class="dependencies"><li><code ng:non-bindable=""><a href="api/ng.$browser">$browser</a></code>
</li>
</ul>
<h2 id="Example">Example</h2>
<div class="example"><div class="ngcookies-cookies-page"><h4>Source</h2>
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-141" source-edit-css="" source-edit-js="script.js-140" source-edit-json="" source-edit-unit="" source-edit-scenario=""></div>
<div class="tabbable"><div class="tab-pane" title="index.html">
<pre class="prettyprint linenums" ng-set-text="index.html-141" ng-html-wrap=" angular.js script.js"></pre>
<script type="text/ng-template" id="index.html-141">
  
</script>
</div>
<div class="tab-pane" title="script.js">
<pre class="prettyprint linenums" ng-set-text="script.js-140"></pre>
<script type="text/ng-template" id="script.js-140">
    function ExampleController($cookies) {
      // Retrieving a cookie
      var favoriteCookie = $cookies.myFavorite;
      // Setting a cookie
      $cookies.myFavorite = 'oatmeal';
    }
  </script>
</div>
</div><h2>Demo</h4>
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-141" ng-eval-javascript="script.js-140"></div>
</div></div>
</div>
